<?php

			
					//what's the pot size?
			$actionTotal = 0;
			foreach($hand['streets'] as $street=>$action){
			//print_r($action['action']);
			echo '<div class="'.str_replace(' ','',$street).'">';
			$streetCards = explode(' ',$action['cards']);
			echo '<div class="streetCards '.str_replace(' ','',$street).'Cards">';
				foreach($streetCards as $key=>$cards){
					if($cards) echo '<div class="card value'.$cards.'"><p>'.$cards.'</p></div>';
				}
				
			echo '</div>';
				if(is_array($action['action'] )){
					foreach($action['action'] as $key=>$value){
					$allin = ($value['all-in']) ? ' (all-in)' : '';
		echo '<div class="action '.$value['action'].'">'.$value['player'].' '.$value['action'].' '.$value['value'].$allin .'</div>';
							$actionTotal += $value['value'];
					}
				}
			echo '<br style="clear: both"/></div>';
			}//end of the streets
			
			echo '<div class="pot">';
		//print_r($hand['pot']);
			foreach($hand['pot'] as $potName=>$pot){
				$pot['potHand'] = ($pot['potHand']!='') ? $pot['potHand'] : $hand['Players'][$pot['player']]['cards'];
				echo '<p>'.$potName.' '.$pot['value'].'</p>';
				echo '<p>Winner: <span class="potWinner">'.$pot['player'].'</span></p>';
				echo '<p>Winning Hand: <span class="potWinningHand">'.$pot['potHand'].'</span></p>';
			}
			echo '</div>';
            ?>